package com.xmg.shop.api.service;

import com.xmg.shop.api.domain.ProductSku;
import com.xmg.shop.api.domain.ProductSkuProperty;
import com.xmg.shop.api.vo.ProductSkuVo;
import com.xmg.shop.api.vo.SkuGenerateFormVo;

import java.util.List;
import java.util.Map;

/**
 * Created by KavenC on 2017/11/15.
 */
public interface IProductSkuService {
    /**
     * 根据商品id查询已生成sku个数
     * @param productId
     * @return
     */
    int queryCountByProductId(Long productId);

    /**
     * 查询所有的sku
     * @param productId
     * @return
     */
    List<ProductSku> selectSkuByProudct(Long productId);

    /**
     * 生成sku
     * @param vo
     * @return
     */
    List<Map<String,Object>> generateSku(SkuGenerateFormVo vo);

    /**
     * 保存sku
     * @param productSkuVo
     */
    void save(ProductSkuVo productSkuVo);

    List<ProductSkuProperty> selectAll();
}
